package com.xbenben.bean;

/**
 * @author xbenbenx
 * Date:2022/10/17 14:24
 **/
public class Test6 {
    //静态变量
    static String i = lcy();
    //静态变量
    static String c = lcy2();

    //静态语句块
    static {
        System.out.println("父类静态语句块1");
    }

    //静态语句块
    static {
        System.out.println("父类静态语句块2");
    }

    //静态语句块
    static {
        System.out.println("父类静态语句块3");
    }

    //非静态变量
    String j = pplcy();

    //非静态语句块
    {
        System.out.println("父类非静态语句块1");
    }

    //非静态语句块
    {
        System.out.println("父类非静态语句块2");
    }

    //构造函数
    public Test6() {
        System.out.println("父类构造函数");
    }

    public static String lcy() {
        System.out.println("父类静态变量");
        return "静态变量";
    }

    public static String lcy2() {
        System.out.println("父类静态变量");
        return "静态变量2";
    }

    //静态方法
    public static void bTest() {
        System.out.println("父类静态方法");
        return;
    }

    public String pplcy() {
        System.out.println("父类非静态变量");
        return "父类非静态变量";
    }

    //非静态方法
    public void bDisplay() {
        System.out.println("父类非静态方法");
        return;
    }


}
